package me.firstapp.module.bbs;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import me.firstapp.module.shop.Order;

@Entity
@Table(name = "SHOP_NOTIFICATION")
public class ShopNotification extends BaseNotification {

	private static final long serialVersionUID = 1L;

	// 通知动作，0为订单支付通知，1为订单支付成功通知，2为订单被取消通知，3为订单已发货通知
	@Column(name = "ACTION", columnDefinition = "TINYINT", nullable = false)
	private Integer action;

	// 关联的订单
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORDER_ID", nullable = false, referencedColumnName = "ID")
	private Order order;

	public Integer getAction() {
		return action;
	}

	public void setAction(Integer action) {
		this.action = action;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

}
